<template>
  <el-select class="!w-[203px]" popper-class="select_popper">
    <el-option v-for="item in items" :key="item.key" :label="item.value" :value="item.key" />
  </el-select>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import type { Entry } from '@/api/types'
import { enumMapCache } from '@/api/index'

const props = defineProps({
  enumType: {
    type: String,
    default: ''
  },
  module: {
    type: String,
    default: 'rbac'
  }
})

const items = ref([] as Entry[])
//查询枚举.
enumMapCache(props.module, props.enumType).then((data) => {
  items.value = data
})
</script>
<style lang="scss">
.select_popper {
  z-index: 99999 !important;
}
</style>
